﻿using System;
using System.Collections.Generic;
using System.Text;

namespace LeePong.Game.Shapes
{
    public class FixedRectangle
    {
        public readonly float X;
        public readonly float Y;
        public readonly int Width;
        public readonly int Height;
        public readonly float Left;
        public readonly float Top;
        public readonly float Right;
        public readonly float Bottom;
        public readonly float CenterX;
        public readonly float CenterY;

        private readonly Rectangle rect;
        public FixedRectangle(Rectangle rect)
        {
            this.rect = rect;
            this.X = rect.Coord.X;
            this.Y = rect.Coord.Y;
            this.Width = rect.Width;
            this.Height = rect.Height;
            this.Left = rect.Left;
            this.Right = rect.Right;
            this.Top = rect.Top;
            this.Bottom = rect.Bottom;
            this.CenterX = rect.CenterX;
            this.CenterY = rect.CenterY;
        }

        public static implicit operator Rectangle(FixedRectangle d)
        {
            return d.rect;
        }
    }
}
